package ground;

@SuppressWarnings("serial")
public class PositionExceedsGroundException extends Exception {
	
	// members
	private int xCord; // x axis coordinate of illegal position
	private int yCord; // y axis coordinate of illegal position
	
	public PositionExceedsGroundException(int xCord, int yCord) {
		// set members as given values
		this.xCord = xCord;
		this.yCord = yCord;
	}
	
	public String getMessage() {
		return String.format("The coordinate (%d,%d) exceeds ground's boundaries", xCord, yCord);		
	}
}
